@echo off
set mysql_command_line_path="C:\Program Files\MySQL\MySQL Server 5.5\bin
set mysql_passowrd=root
for /F "tokens=3 delims=: " %%H in ('sc query "mysql" ^| findstr "        STATE"') do (
 if /I "%%H" NEQ "RUNNING" (
  echo net start "mysql"
  net start mysql
 ) ELSE (
echo mysql is running
)
)
%mysql_command_line_path%\mysql.exe" -u root -p%mysql_passowrd%  < createDB.sql
echo configurer finish ok....
